Integrand size = 17, antiderivative size = 121 \[ \int \tanh ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\frac {\left (a^2-4 a b-8 b^2\right ) \text {arctanh}\left (\frac {\sqrt {b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{8 b^{3/2}}+\sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )-\frac {(a+4 b) \tanh (x) \sqrt {a+b \tanh ^2(x)}}{8 b}-\frac {1}{4} \tanh ^3(x) \sqrt {a+b \tanh ^2(x)} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {3751, 489, 596, 537, 223, 212, 385} \[ \int \tanh ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\frac {\left (a^2-4 a b-8 b^2\right ) \text {arctanh}\left (\frac {\sqrt {b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{8 b^{3/2}}+\sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )-\frac {(a+4 b) \tanh (x) \sqrt {a+b \tanh ^2(x)}}{8 b}-\frac {1}{4} \tanh ^3(x) \sqrt {a+b \tanh ^2(x)} \]
[In]
[Out]
Rule 212
Rule 223
Rule 385
Rule 489
Rule 537
Rule 596
Rule 3751
Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {x^4 \sqrt {a+b x^2}}{1-x^2} \, dx,x,\tanh (x)\right ) \\ & = -\frac {1}{4} \tanh ^3(x) \sqrt {a+b \tanh ^2(x)}+\frac {1}{4} \text {Subst}\left (\int \frac {x^2 \left (3 a+(a+4 b) x^2\right )}{\left (1-x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tanh (x)\right ) \\ & = -\frac {(a+4 b) \tanh (x) \sqrt {a+b \tanh ^2(x)}}{8 b}-\frac {1}{4} \tanh ^3(x) \sqrt {a+b \tanh ^2(x)}+\frac {\text {Subst}\left (\int \frac {a (a+4 b)+\left (-a^2+4 a b+8 b^2\right ) x^2}{\left (1-x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tanh (x)\right )}{8 b} \\ & = -\frac {(a+4 b) \tanh (x) \sqrt {a+b \tanh ^2(x)}}{8 b}-\frac {1}{4} \tanh ^3(x) \sqrt {a+b \tanh ^2(x)}+(a+b) \text {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tanh (x)\right )+\frac {\left (a^2-4 a b-8 b^2\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+b x^2}} \, dx,x,\tanh (x)\right )}{8 b} \\ & = -\frac {(a+4 b) \tanh (x) \sqrt {a+b \tanh ^2(x)}}{8 b}-\frac {1}{4} \tanh ^3(x) \sqrt {a+b \tanh ^2(x)}+(a+b) \text {Subst}\left (\int \frac {1}{1-(a+b) x^2} \, dx,x,\frac {\tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )+\frac {\left (a^2-4 a b-8 b^2\right ) \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {\tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{8 b} \\ & = \frac {\left (a^2-4 a b-8 b^2\right ) \text {arctanh}\left (\frac {\sqrt {b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{8 b^{3/2}}+\sqrt {a+b} \text {arctanh}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )-\frac {(a+4 b) \tanh (x) \sqrt {a+b \tanh ^2(x)}}{8 b}-\frac {1}{4} \tanh ^3(x) \sqrt {a+b \tanh ^2(x)} \\ \end{align*}
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 6.21 (sec) , antiderivative size = 580, normalized size of antiderivative = 4.79 \[ \int \tanh ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\frac {-\frac {b \left (a^2-4 b^2\right ) \sqrt {\frac {a-b+(a+b) \cosh (2 x)}{1+\cosh (2 x)}} \sqrt {-\frac {a \coth ^2(x)}{b}} \sqrt {-\frac {a (1+\cosh (2 x)) \text {csch}^2(x)}{b}} \sqrt {\frac {(a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)}{b}} \text {csch}(2 x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)}{b}}}{\sqrt {2}}\right ),1\right ) \sinh ^4(x)}{a (a-b+(a+b) \cosh (2 x))}-\frac {4 i b \left (4 a b+4 b^2\right ) \sqrt {1+\cosh (2 x)} \sqrt {\frac {a-b+(a+b) \cosh (2 x)}{1+\cosh (2 x)}} \left (-\frac {i \sqrt {-\frac {a \coth ^2(x)}{b}} \sqrt {-\frac {a (1+\cosh (2 x)) \text {csch}^2(x)}{b}} \sqrt {\frac {(a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)}{b}} \text {csch}(2 x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)}{b}}}{\sqrt {2}}\right ),1\right ) \sinh ^4(x)}{4 a \sqrt {1+\cosh (2 x)} \sqrt {a-b+(a+b) \cosh (2 x)}}+\frac {i \sqrt {-\frac {a \coth ^2(x)}{b}} \sqrt {-\frac {a (1+\cosh (2 x)) \text {csch}^2(x)}{b}} \sqrt {\frac {(a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)}{b}} \text {csch}(2 x) \operatorname {EllipticPi}\left (\frac {b}{a+b},\arcsin \left (\frac {\sqrt {\frac {(a-b+(a+b) \cosh (2 x)) \text {csch}^2(x)}{b}}}{\sqrt {2}}\right ),1\right ) \sinh ^4(x)}{2 (a+b) \sqrt {1+\cosh (2 x)} \sqrt {a-b+(a+b) \cosh (2 x)}}\right )}{\sqrt {a-b+(a+b) \cosh (2 x)}}}{4 b}+\sqrt {\frac {a-b+a \cosh (2 x)+b \cosh (2 x)}{1+\cosh (2 x)}} \left (\frac {\text {sech}(x) (-a \sinh (x)-6 b \sinh (x))}{8 b}+\frac {1}{4} \text {sech}^2(x) \tanh (x)\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(336\) vs. \(2(99)=198\).
Time = 0.10 (sec) , antiderivative size = 337, normalized size of antiderivative = 2.79
method | result | size |
derivativedivides | \(-\frac {\sqrt {a +b \tanh \left (x \right )^{2}}\, \tanh \left (x \right )}{2}-\frac {a \ln \left (\sqrt {b}\, \tanh \left (x \right )+\sqrt {a +b \tanh \left (x \right )^{2}}\right )}{2 \sqrt {b}}-\frac {\tanh \left (x \right ) \left (a +b \tanh \left (x \right )^{2}\right )^{\frac {3}{2}}}{4 b}+\frac {a \tanh \left (x \right ) \sqrt {a +b \tanh \left (x \right )^{2}}}{8 b}+\frac {a^{2} \ln \left (\sqrt {b}\, \tanh \left (x \right )+\sqrt {a +b \tanh \left (x \right )^{2}}\right )}{8 b^{\frac {3}{2}}}-\frac {\sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{2}-\frac {\sqrt {b}\, \ln \left (\frac {b \left (\tanh \left (x \right )-1\right )+b}{\sqrt {b}}+\sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}\right )}{2}+\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b +2 b \left (\tanh \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{\tanh \left (x \right )-1}\right )}{2}+\frac {\sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}{2}-\frac {\sqrt {b}\, \ln \left (\frac {b \left (1+\tanh \left (x \right )\right )-b}{\sqrt {b}}+\sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}\right )}{2}-\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b -2 b \left (1+\tanh \left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}{1+\tanh \left (x \right )}\right )}{2}\) | \(337\) |
default | \(-\frac {\sqrt {a +b \tanh \left (x \right )^{2}}\, \tanh \left (x \right )}{2}-\frac {a \ln \left (\sqrt {b}\, \tanh \left (x \right )+\sqrt {a +b \tanh \left (x \right )^{2}}\right )}{2 \sqrt {b}}-\frac {\tanh \left (x \right ) \left (a +b \tanh \left (x \right )^{2}\right )^{\frac {3}{2}}}{4 b}+\frac {a \tanh \left (x \right ) \sqrt {a +b \tanh \left (x \right )^{2}}}{8 b}+\frac {a^{2} \ln \left (\sqrt {b}\, \tanh \left (x \right )+\sqrt {a +b \tanh \left (x \right )^{2}}\right )}{8 b^{\frac {3}{2}}}-\frac {\sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{2}-\frac {\sqrt {b}\, \ln \left (\frac {b \left (\tanh \left (x \right )-1\right )+b}{\sqrt {b}}+\sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}\right )}{2}+\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b +2 b \left (\tanh \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{\tanh \left (x \right )-1}\right )}{2}+\frac {\sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}{2}-\frac {\sqrt {b}\, \ln \left (\frac {b \left (1+\tanh \left (x \right )\right )-b}{\sqrt {b}}+\sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}\right )}{2}-\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b -2 b \left (1+\tanh \left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}{1+\tanh \left (x \right )}\right )}{2}\) | \(337\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 2030 vs. \(2 (99) = 198\).
Time = 0.58 (sec) , antiderivative size = 9360, normalized size of antiderivative = 77.36 \[ \int \tanh ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \tanh ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\int \sqrt {a + b \tanh ^{2}{\left (x \right )}} \tanh ^{4}{\left (x \right )}\, dx \]
[In]
[Out]
\[ \int \tanh ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\int { \sqrt {b \tanh \left (x\right )^{2} + a} \tanh \left (x\right )^{4} \,d x } \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 938 vs. \(2 (99) = 198\).
Time = 0.99 (sec) , antiderivative size = 938, normalized size of antiderivative = 7.75 \[ \int \tanh ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \tanh ^4(x) \sqrt {a+b \tanh ^2(x)} \, dx=\int {\mathrm {tanh}\left (x\right )}^4\,\sqrt {b\,{\mathrm {tanh}\left (x\right )}^2+a} \,d x \]
[In]
[Out]